﻿@{
    ViewBag.Title = "积分管理";
}
@using PagedList
@using PagedList.Mvc
@model PagedList.IPagedList<zqdn.Web.ViewModels.IntegerViewModel>

@{
    List<zqdn.Models.Ex.Goods> goodList = ViewBag.goodList;
}


<div class="pageheader">
    <h2><i class="fa fa-user"></i> 积分管理 </h2>
</div>

<div class="contentpanel">
    <div class="row">
        <a href="/admin/Integer/ExportExcel" class="btn btn-primary">导出兑换明细</a>
    </div>
    <div class="row">
        <div class="table-responsive">
            <table class="table table-hidaction table-hover">
                <thead>
                    <tr>
                        <th width="30%">兑换奖品</th>
                        <th>手机</th>
                        <th>姓名</th>
                        <th>地址</th>
                    </tr>
                </thead>
                <tbody>
                  @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @foreach (var item2 in goodList)
                                {
                                    if (item2.ID == item.GID)
                                    {
                                        <span>@item2.Name</span>
                                    }
                                }
                                 
                            </td>
                            <td>@item.Mobile</td>
                            <td>@item.Name</td>
                            <td>@item.Address</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div><!-- table-responsive -->
        @Html.PagedListPager((PagedList.IPagedList)Model, page => Url.Action("Index", new
                           {
                               page,
                               adName = ViewBag.AdName
                           })
                            , PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(
                            new PagedListRenderOptions()
                            {
                                LinkToPreviousPageFormat = "上一页",
                                LinkToNextPageFormat = "下一页",
                                MaximumPageNumbersToDisplay = 5
                            }, new AjaxOptions()
                            {
                                HttpMethod = "GET"
                            }))
    </div><!-- row -->
</div>

 